function [pref_class] = HPZ_Interface_Preference_classification()

    pref_class = 0; % Default

    S.fh = figure('units','pixels',...
                          'position',[500 400 260 200],...
                          'menubar','none',...
                          'name','Preferences Classification',...
                          'numbertitle','off',...
                          'resize','off');

    S.bg = uibuttongroup('units','pix',...
                         'pos',[25 100 210 90]);
    S.rd(1) = uicontrol(S.bg,...
                        'style','rad',...
                        'unit','pix',...
                        'position',[25 50 70 30],...
                        'string','Risk');
    S.rd(2) = uicontrol(S.bg,...
                        'enable','off', ...
                        'style','rad',...
                        'unit','pix',...
                        'position',[25 10 70 30],...
                        'string','Others');
    S.rd(3) = uicontrol(S.bg,...
                        'enable','off', ...
                        'style','rad',...
                        'unit','pix',...
                        'position',[125 50 70 30],...
                        'string','Altruism');      

    S.ed = uicontrol('style','edit',...
                     'unit','pix',...
                     'position',[100 60 70 30],...
                     'string','Risk');                

    S.pb(1) = uicontrol('style','push',...
                     'unit','pix',...
                     'position',[70 20 60 30],...
                     'string','Confirm',...
                     'callback',{@pb1_call,S});

    S.pb(2) = uicontrol('style','push',...
                     'unit','pix',...
                     'position',[130 20 60 30],...
                     'string','OK',...
                     'callback',{@pb2_call,S});

    uiwait(S.fh)  % Prevent all other processes from starting until closed.

    function [] = pb2_call(varargin)
        % Callback for pushbutton.
        S = varargin{3};  % Get the structure.
        % Instead of switch, we could use num2str on:   
        % find(get(S.bg,'selectedobject')==S.rd)      (or similar)
        % Note the use of findobj.  This is because of a BUG in MATLAB, whereby if
        % the user selects the same button twice, the selectedobject property will
        % not work correctly.

        pref_class = 1;

        switch findobj(get(S.bg,'selectedobject'))
            case S.rd(1)
                set(S.ed,'string','Risk') % Set the editbox string.
                pref_class = 1;
            case S.rd(2)
                set(S.ed,'string','Others')
                pref_class = 3;
            case S.rd(3)
                set(S.ed,'string','Altruism')
                pref_class = 2;
        end

        close(S.fh);

    end

    function [] = pb1_call(varargin)
        % Callback for pushbutton.
        S = varargin{3};  % Get the structure.
        % Instead of switch, we could use num2str on:   
        % find(get(S.bg,'selectedobject')==S.rd)      (or similar)
        % Note the use of findobj.  This is because of a BUG in MATLAB, whereby if
        % the user selects the same button twice, the selectedobject property will
        % not work correctly.
        switch findobj(get(S.bg,'selectedobject'))
            case S.rd(1)
                set(S.ed,'string','Risk') % Set the editbox string.

            case S.rd(2)
                set(S.ed,'string','Others')

            case S.rd(3)
                set(S.ed,'string','Altruism')

        end

    end

end